package org.mspring.platform.api.rss.elements;

import electric.xml.Element;

/**
 * 
 * @author Gao Youbo
 * @since 2013年7月26日
 */
public class Image extends SyndicatedElement {
    private static final long serialVersionUID = -633384571120735094L;
    String url;

    public String getUrl() {
        return this.url;
    }

    public void setUrl(String paramString) {
        this.url = paramString;
    }

    public static Image getImage(Element paramElement) {
        Image localImage = null;
        DublinCore.init(paramElement);
        Element localElement1 = paramElement.getElement("image");
        if (localElement1 == null) {
            Element localElement2 = paramElement.getElement("channel");
            localElement1 = localElement2.getElement("image");
        }
        if (localElement1 != null) {
            localImage = new Image();
            localImage.setAbout(DublinCore.getNSAttrValue(localElement1, DublinCore.rdf, "about"));
            localImage.setTitle(DublinCore.getElementValue(localElement1, "title"));
            localImage.setLink(DublinCore.getElementValue(localElement1, "link"));
            localImage.setUrl(DublinCore.getElementValue(localElement1, "url"));
            DublinCore.setDublinCoreElements(localElement1, localImage);
        }
        return localImage;
    }
}